Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only show replication factor input when relevant #130

Merged
merged 1 commit into from
Mar 17, 2021

Conversation

fbricon
Copy link
Collaborator

@fbricon fbricon commented Mar 16, 2021

When creating a new topic from the wizard

  • read offsets.topic.replication.factor from broker config to determine default replication factor
  • fallback to default.replication.factor
  • fallback to the lowest value between 3 and the number of brokers (looking at you cloudkarafka)

The max number of replicas is determined by the number of brokers.

If value <= 1, the replication factor input is not shown in the topic wizard
If value > max replicas, a validation error is displayed

Fixes #64

@fbricon fbricon requested a review from angelozerr March 16, 2021 10:38
@fbricon fbricon force-pushed the replication-factor branch from 7ab0f02 to 0a199c2 Compare March 16, 2021 10:52
src/wizards/topics.ts Outdated Show resolved Hide resolved
@fbricon fbricon force-pushed the replication-factor branch from 0a199c2 to f6efaac Compare March 16, 2021 11:40
src/wizards/topics.ts Outdated Show resolved Hide resolved
@fbricon fbricon force-pushed the replication-factor branch 2 times, most recently from deb03e8 to eeaede1 Compare March 17, 2021 09:11
When creating a new topic from the wizard:

 - read offsets.topic.replication.factor from broker config to determine default replication factor
 - fallback to default.replication.factor
 - fallback to the lowest value between 3 and the number of brokers (looking at you cloudkarafka)

The max number of replicas is determined by the number of brokers.

If value <= 1, the replication factor input is not shown in the topic wizard
If value > max replicas, a validation error is displayed

Signed-off-by: Fred Bricon <[email protected]>
@fbricon fbricon force-pushed the replication-factor branch from eeaede1 to e99a28d Compare March 17, 2021 09:12
@angelozerr angelozerr merged commit d3694f4 into jlandersen:master Mar 17, 2021
@angelozerr
Copy link
Collaborator

Thanks @fbricon !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't show replication factor input when offsets.topic.replication.factor=1
2 participants